#ifndef __Led_H__
#define __Led_H__
/************************************************************************************/
#include "..\Inc\type.h"


//LED
/***************************************************************************************
0x80  | 0x08  | 0x02  | 0x00  |   mask   start
order | mode  | temp  | time  |   byte0    0
jdz   | ksz   | zqk   | sgd   |   byte1    8
rfsk  | ltrf  | sxjr  | bwhg  |   byte2    16
paly  | light | fan   | power |   byte3    24
***************************************************************************************/
#define LED_JDZ      8
#define LED_KSZ      10
#define LED_ZQK      12
#define LED_SGD      14
//#define LED_RFSK     16
//#define LED_LTRF     18
//#define LED_SXJR     20
//#define LED_BWHG     22
#define LED_RFSK     22
#define LED_LTRF     20
#define LED_SXJR     18
#define LED_BWHG     16

#define LED_TIME     6
#define LED_TEMP     4
#define LED_MENU     2 
#define LED_ORDER    0
#define LED_POWER    30
#define LED_FAN      28
#define LED_LIGHT    26
#define LED_PLAY     24

#define HIGH_LIGTH   0x03
#define LOW_LIGTH    0x01
#define NO_LIGHT     0X00

#define HIGH_LIGTH_INIT   0xFF
#define LOW_LIGHT_INIT    0Xaa
#define NO_LIGHT_INIT     0X00
//LCD
/***************************************************************************************
 0x80  | 0x40  | 0x20   | 0x10   | 0x08   | 0x04   | 0x02  | 0x01   |   mask   start
power  | tu8_b | tu8_c  | tu8_d  |  x     |  x     |  x    |   x    |   byte0    0
 fan_3 |fanCent| fan_2  |  fan_1 | tu8_a  | tu8_g  | tu8_e |  light |   byte1    8
tu4_e  | tu7_c | tu7_b  |  tu7_a |  pause |   x    |  x    |  play  |   byte2    16
second | tu6_c | tu6_b  | tu6_a  |  tu7_d |  tu7_e | tu7_g |  tu7_f |   byte3    24
tu4_d  | tu5_c | tu5_b  |  tu5_a |  tu6_d |  tu6_e | tu6_g |  tu6_f |   byte4    32
tu4_c  | tu4_g | tu4_b  |  tu4_a |  tu5_d |  tu5_e | tu5_g |  tu5_f |   byte5    40
tu3_d  | tu3_e | tu3_g  |  tu3_f |  temp  |  tu3_c | tu3_b |  tu3_a |   byte6    48
tu2_d  | tu2_e | tu2_g  |  tu2_f |  order |  tu2_c | tu2_b |  tu2_a |   byte7    56
tu1_d  | tu1_e |  x     |  mode  |  tu1_c |  tu1_g | tu1_b |  tu1_a |   byte8    64
******************************************************************************************/
#define ICON_POWER          7
#define ICON_LIGHT          8
#define ICON_FAN_1          12
#define ICON_FAN_2          13
#define ICON_FAN_CENTER     14
#define ICON_FAN_3          15
#define ICON_PLAY           16
#define ICON_PAUSE          19
#define ICON_SECOND         31
#define ICON_TEMP           51
#define ICON_MENU           68  
#define ICON_ORDER          59  //

#define TUBE1_A   0X01  //  byte8
#define TUBE1_B   0X02  //  byte8
#define TUBE1_C   0X08  //  byte8
#define TUBE1_D   0X80  //  byte8
#define TUBE1_E   0X40  //  byte8
//#define TUBE1_F   
#define TUBE1_G   0X04  //  byte8


#define TUBE2_A   0X01  //  byte7
#define TUBE2_B   0X02  //  byte7
#define TUBE2_C   0X04  //  byte7
#define TUBE2_D   0X80  //  byte7
#define TUBE2_E   0X40  //  byte7
#define TUBE2_F   0X10  //  byte7
#define TUBE2_G   0X20  //  byte7

#define TUBE3_A   0X01  //  byte6
#define TUBE3_B   0X02  //  byte6
#define TUBE3_C   0X04  //  byte6
#define TUBE3_D   0X80  //  byte6
#define TUBE3_E   0X40  //  byte6
#define TUBE3_F   0X10  //  byte6
#define TUBE3_G   0X20  //  byte6

#define TUBE4_A   0X10  //  byte5
#define TUBE4_B   0X20  //  byte5
#define TUBE4_C   0X80  //  byte5
#define TUBE4_D   0X80  //  byte4
#define TUBE4_E   0X80  //  byte2
//#define TUBE4_F   0X10  //
#define TUBE4_G   0X40  //  byte5

#define TUBE5_A   0X10  //  byte4
#define TUBE5_B   0X20  //  byte4
#define TUBE5_C   0X40  //  byte4
#define TUBE5_D   0X08  //  byte5
#define TUBE5_E   0X04  //  byte5
#define TUBE5_F   0X01  //  byte5
#define TUBE5_G   0X02  //  byte5

#define TUBE6_A   0X10  //  byte3
#define TUBE6_B   0X20  //  byte3
#define TUBE6_C   0X40  //  byte3
#define TUBE6_D   0X08  //  byte4
#define TUBE6_E   0X04  //  byte4
#define TUBE6_F   0X01  //  byte4
#define TUBE6_G   0X02  //  byte4

#define TUBE7_A   0X10  //  byte2
#define TUBE7_B   0X20  //  byte2
#define TUBE7_C   0X40  //  byte2
#define TUBE7_D   0X08  //  byte3
#define TUBE7_E   0X04  //  byte3
#define TUBE7_F   0X01  //  byte3
#define TUBE7_G   0X02  //  byte3

#define TUBE8_A   0X08  //  byte1
#define TUBE8_B   0X40  //  byte0
#define TUBE8_C   0X20  //  byte0
#define TUBE8_D   0X10  //  byte0
#define TUBE8_E   0X02  //  byte1
//#define TUBE8_F  
#define TUBE8_G   0X04  //  byte1

void LedProcess(bool update);
void Led_BackLightCtrl(S8 para1,S8 para2,bool positive);

#endif 


